﻿namespace Community.CsharpSqlite.Entity
{
    /*
    ** Global data for the page cache.
    */

    public class PCacheGlobal
    {
        public int isInit; /* True if initialized */
        public sqlite3_mutex mutex; /* static mutex MUTEX_STATIC_LRU */
        public int nCurrentPage; /* Number of purgeable pages allocated */

        public int nMaxPage; /* Sum of nMaxPage for purgeable caches */
        public int nMinPage; /* Sum of nMinPage for purgeable caches */
        public object pEnd; /* Bounds of pagecache malloc range */
        public PgFreeslot pFree; /* Free page blocks */
        public PgHdr1 pLruHead, pLruTail; /* LRU list of unused clean pgs */

        /* Variables related to ConfigOption.SQLITE_CONFIG_PAGECACHE settings. */
        public object pStart; /* Bounds of pagecache malloc range */
        public int szSlot; /* Size of each free slot */
    }
}